package com.sword.invoice.repository;

import com.sword.common.bean.Result;
import com.sword.common.strategy.ISCommonStrategy;
import com.sword.invoice.bean.bo.InvoiceDriverConfig;
import com.sword.invoice.bean.bo.sales.InvoiceOrder;

/**
 * @description: 蓝票开具驱动策略抽象接口
 * @author：Lv.RJ
 * @version: 1.0.0
 * @create: 2025/02/14
 **/

public abstract class AbsBlueInvoiceStrategy implements ISCommonStrategy {
    /** 订单 */
    private InvoiceOrder order = null;

    /** 参数 */
    private InvoiceDriverConfig driverConfig = null;


    /**
     * 可以不实现
     * 操作前处理 包含必要的校验以及对当前通道支付配置信息的初始化
     * 出现错误不会保存相关信息
     */
    public void doBeforeInvoiceHandler(){
    }

    /**
     * 执行操作
     * 出现错误会保存相关信息  必须实现抽象方法
     */
    public abstract Result doInvoiceHandler();





    public InvoiceOrder getOrder() {
        return order;
    }

    public void setOrder(InvoiceOrder order) {
        this.order = order;
    }

    public InvoiceDriverConfig getPayParam() {
        return driverConfig;
    }

    public void setPayParam(InvoiceDriverConfig payParam) {
        this.driverConfig = payParam;
    }
}
